<%-- 
    Document   : index
    Created on : 25/05/2013, 12:08:24
    Author     : MauroH
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" language="java"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ include file="permissaoRedirect.jsp" %>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Agendou!</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <!-- Loading Bootstrap -->
        <link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet">
        <link href="assets/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="assets/bootstrap/css/prettify.css" rel="stylesheet">

        <!-- Loading Flat UI -->
        <link href="assets/css/flat-ui.css" rel="stylesheet">
        <link href="assets/css/custom.css" rel="stylesheet">

        <link rel="shortcut icon" href="assets/images/favicon.ico">

        <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
        <!--[if lt IE 9]>
          <script src="assets/js/html5shiv.js"></script>
        <![endif]-->
        
    </head>
    <body>
        <jsp:useBean id="horario" scope="session" class="model.Horarios" />
        <div class="container">
            <div class="head row-fluid">
                <div class="span3">
                    <h1><a href="/Agendou/agenda">Agendou!</a></h1>
                </div>
                <div class="span5 offset4">
                    <div class="navbar navbar-inverse">
                        <div class="navbar-inner">
                            <div class="container">
                                <a href="#" class="menu" data-toggle="collapse" data-target="#nav-collapse-01" >
                                    <span>Menu</span>
                                    <div class="btn btn-navbar">
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </div>
                                </a>
                                <div class="nav-collapse collapse" id="nav-collapse-01">
                                    <ul class="nav">
                                        <li>
                                            <a href="/Agendou/agenda">
                                                Agenda
                                            </a>
                                        </li>
                                        <li>
                                            <c:choose>
                                                <c:when test="${usuario.is_admin == true}">

                                                    <a href="#fakelink">
                                                        Administração
                                                    </a>
                                                    <ul>
                                                        <li>
                                                            <a href="cadHorarios.jsp">Cadastrar horário</a>
                                                        </li>
                                                        <li>
                                                            <a href="#fakelink">Listar horários</a>
                                                        </li>
                                                        <li>
                                                            <a href="#fakelink">Usuários</a>
                                                        </li>
                                                    </ul>

                                                </c:when>
                                                <c:otherwise>
                                                    <a href="#fakelink">
                                                        Minha Conta
                                                    </a>
                                                </c:otherwise>
                                            </c:choose>
                                        </li>
                                        <li>
                                            <a href="/Agendou/agenda?cmd=logout">
                                                Sair
                                            </a>
                                        </li>
                                    </ul>
                                </div><!--/.nav -->
                            </div>
                        </div>
                    </div>
                </div>
            </div> <!-- /row -->
            <hr />
            <div class="span6 menu2">
                <div class="page-info row-fluid">
                    <div class="navbar navbar-inverse">
                        <div class="navbar-inner">
                            <div class="container">
                                <ul class="nav">
                                    <li class="active">
                                        <a href="#" class="forever-alone">
                                            Confirmar exclusão
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                 <!--<ul class="breadcrumb">
                    <li><a href="#">Home</a> <span class="divider">/</span></li>
                    <li><a href="#">Library</a> <span class="divider">/</span></li> 
                    <li class="active">Home</li>
                </ul>-->
            </div>
            <div class="clearfix"></div>
            
            <div class="row-fluid">
                <div class="form">
                    <form action="/Agendou/agenda?cmd=excluirAgenda&idhorario=${param.idhorario}" method="POST">
                        <div class="alert alert-error">Tem certeza que deseja excluir esse horário?</div>

                        <input type="hidden" class="field" value="${user.nome}" name="name" />
                        <fmt:parseDate pattern="yyyy-MM-dd" value="${horario.data}" var="parsedStatusDate" />
                        <fmt:formatDate pattern="dd/MM/yyyy" value="${parsedStatusDate}" var="formattedStatusDate" />
                        <input type="hidden" class="field" value="${formattedStatusDate}" name="data" />
                        <fmt:formatDate pattern="HH:mm" value="${horario.horario}" var="formattedStatusTime" />
                        <input type="hidden" class="field" value="${formattedStatusTime}" name="horario" />
                        <input type="hidden" class="field" value="${servico.nomeServico}" name="horario" />
                        <input type="hidden" name="cpf" value="${user.cpf}" />
                        
                        <input type="submit" class="btn btn-primary btn-large btn-block btn-danger" value="Sim" />
                    </form>
                    <a class="form-link" href="/Agendou/agenda">Voltar</a>
                  </div>
              </div>
        
        <script src="assets/js/jquery-1.8.3.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
    </body>
</html>
